﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Eds.Model;
using NHibernate;
using NHibernate.Criterion;

namespace Eds.Sql
{
    public class MailSearch
    {
        private ISession _session;

        public MailSearch(ISession session)
        {
            _session = session;

            MailType = -1;
        }

        protected int MailType { get; set; }
        public int PageSize { get; set; }
        public int CurrentPage { get; set; }


        //public IList<EdsMail> SearchAll()
        //{
        //    ICriteria criteria = _session.CreateCriteria<EdsMail>();

        //    if(MailType>-1)
        //    {
        //        criteria.Add(Restrictions.Eq("MailType", MailType));
        //    }

        //    criteria.SetFirstResult(0).SetMaxResults(10);

        //    return criteria.List<EdsMail>();
        //}
    }
}
